home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: wmclose.tcl,v 1.3 1995/02/03 16:55:31 zibi Exp $
- #
- # Test the wmCloseCallback ( WM_DELETE_WINDOW )
- # Should give popup dialog in response to WmClose
-
- # Response to WM Close
- proc wmCloseCB {cbs} {
- set dialog [keylget cbs dialog]
-
- set dd [VtMessageDialog $dialog.msg \
- -message "You've selected the close item"]
- VtShow $dd
- }
-
- # Clean exit applet
- proc ExitCB { cbd } { VtClose; exit 0 }
-
-
- set app [VtOpen CloseMe]
-
- set dlog [VtMessageDialog $app.msg -message "Try the close item" \
- -wmCloseCallback wmCloseCB \
- -wmDecoration ALL \
- -ok -okLabel Exit -okCallback ExitCB ]
-
- VtShow $dlog
- VtMainLoop
-